﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Answers.aspx.vb" Inherits="Training.Answers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: Quiz Answers</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctr">
        <h2>Quiz Answers</h2>
        
        <asp:GridView ID="gvAnswers" Width="100%" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="AnswerID" 
            DataSourceID="dsAnswers" EmptyDataText="No Answers Available" PageSize="20">
            <RowStyle CssClass="row1" />
            <EmptyDataRowStyle CssClass="row1" />
            <Columns>
                <asp:BoundField DataField="AnswerID" HeaderText="ID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="AnswerID">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Answer" HeaderText="Answer" SortExpression="Answer">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="AnswerID,Answer" 
                    DataNavigateUrlFormatString="EditAnswer.aspx?aid={0}&amp;ans={1}" 
                    HeaderText="Edit/Delete" Text="edit">
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" />
                </asp:HyperLinkField>
            </Columns>
            <PagerStyle CssClass="small" />
            <HeaderStyle CssClass="rowHead" ForeColor="White" />
            <EditRowStyle CssClass="row1" />
            <AlternatingRowStyle CssClass="row2" />
        </asp:GridView>
        
        <p><a href="AddNewAnswer.aspx">Add New Answer</a></p>
        
        <p><a href="QuizControl.aspx">Quiz Control</a> - 
        <a href="Default.aspx">Admin Main</a></p>
    </div>
    
    <asp:SqlDataSource ID="dsAnswers" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="SELECT [AnswerID], [Answer] FROM [QuizAnswers]"></asp:SqlDataSource>
    </form>
</body>
</html>
